gh-131798: JIT: Assign type to sliced string#133609
Closed
fluhus wants to merge 3 commits intopython:mainfrom
fluhus:amit
Closed
gh-131798: JIT: Assign type to sliced string#133609fluhus wants to merge 3 commits intopython:mainfrom fluhus:amit
fluhus wants to merge 3 commits intopython:mainfrom
fluhus:amit
Conversation
sharktide
suggested changes
May 8, 2025
Member
|
This isn’t a user-facing change (but a NEWS entry doesn’t hurt). |
Contributor
sorry, did I type that? my brain wasn't working. Yes, you're right, a news entry would be best here and this isn't a user facing change. |
brandtbucher
approved these changes
May 8, 2025
Comment on lines
+1100
to
+1102
| // Slicing a string always returns a string. | ||
| // TODO: We can apply this to lists and tuples as well. | ||
| // We'll start with string to simplify the process. |
Member
There was a problem hiding this comment.
Wanna just add the others to this PR too? It's just two lines here and a couple of tests.
sharktide
approved these changes
May 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slicing a string always returns a string.
Make the optimizer assign a string type to the result of slicing a string.
Follow up to-do: apply this to lists and tuples too.
@brandtbucher